﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Microsoft.Reporting.WebForms;

public partial class TestMicrosoftReport : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //DataTable dtNew = StoredProceduresClass.getReportNoOfUsersSectorsArea(DateTime.Now.AddYears(-1), DateTime.Now, true, false);

        

            


        //ReportsDataSet rds = new ReportsDataSet();


        //foreach (DataRow dr in dtNew.Rows)
        //{
        //    ReportsDataSet.ReportSectorAreaRow newDr = rds.ReportSectorArea.NewReportSectorAreaRow();
        //    newDr.SectorNameAR = dr["SectorNameAR"].ToString();
        //    newDr.SectorNameEN = dr["SectorNameEN"].ToString();
        //    newDr.CenterShare = long.Parse(dr["Central"].ToString());
        //    newDr.CenterPerson = long.Parse(dr["CentralPersons"].ToString());
        //    newDr.EastShare = long.Parse(dr["East"].ToString());
        //    newDr.EastPerson = long.Parse(dr["EastPersons"].ToString());
        //    newDr.WestShare = long.Parse(dr["West"].ToString());
        //    newDr.WestPerson = long.Parse(dr["WestPersons"].ToString());
        //    newDr.SouthShare = long.Parse(dr["South"].ToString());
        //    newDr.SouthPerson = long.Parse(dr["SouthPersons"].ToString());

        //    rds.ReportSectorArea.AddReportSectorAreaRow(newDr);
        //}


        //ReportViewer1.LocalReport.ReportPath = Server.MapPath("./Reports/ReportAreaSector.rdlc");
        //ReportViewer1.LocalReport.Refresh();
        //ReportViewer1.LocalReport.DataSources.Clear();
        //ReportDataSource item = new ReportDataSource("DataSet1", (IEnumerable<ReportsDataSet.ReportSectorAreaRow>)rds.ReportSectorArea);
        //ReportViewer1.LocalReport.DataSources.Add(item);

        //ReportViewer1.DataBind();
        

    }
}